#include<stdio.h>
#include<string.h>
#include<unistd.h>
#include"mybuffer.h"

int main()
{
    myFILE*fp=my_fopen("./log.txt","w");
    if(fp==NULL)
    {
        perror("my_fopen");
        return 1;
    }
    int cnt=20;
    const char*mag="this is my buffer lib";
    while(cnt--)
    {
        my_fwrite(mag,strlen(mag),fp);
        sleep(1);
    }
    my_fclose(fp);
    return 0;
}
